<template>
  <div>
    <ul>
      <li v-for="item in list" :key="item.data" class="cenima">
        <div class="cenima_nameinfo">
          <p class="cenima_nameinfo_f">&nbsp;{{ item.name }}</p>
          <p class="cenima_nameinfo_se">&nbsp;{{ item.address }}</p>
        </div>
        <div class="cenima_priceinfo">
          <p class="cenima_priceinfo_f">
            ￥<strong>{{ (item.lowPrice / 100) | priceFilter }}</strong
            >起
          </p>
          <p class="cenima_priceinfo_se">{{ item.Distance | priceFilter }}km</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
import { doGet } from "@/helper/ajax_helper.js";
import { priceFilter } from "@/helper/filter_helper.js";
export default {
  data() {
    return {
      list: [],
    };
  },
  priceFilter: {
    priceFilter,
  },
  name: "Cinemas",
  components: {},
  mounted() {
    doGet(
      "/gateway?cityId=440100&ticketFlag=1&k=6876454",
      "mall.film-ticket.cinema.list",
      (res) => (this.list = res.data.cinemas)
    );
  },
};
</script>
<style lang="scss" scoped>
li {
  width: 100%;
  height: 92px;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: space-around;
  align-items: center;
  .cenima_nameinfo {
    width: 180px;
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 30px;
    text-align: left;
    .cenima_nameinfo_f {
      width: 100%;
      height: 30px;
      font-size: 14px;
      color: #191a1b;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .cenima_nameinfo_se {
      width: 180px;
      height: 25px;
      font-size: 0.173333rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: #797d82;
      line-height: 19px;
    }
  }
  .cenima_priceinfo {
    width: 80px;
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 30px;
    .cenima_priceinfo_f {
      height: 30px;
      font-size: 12px;
      color: #ff5f16;
      strong{
        font-size: 14px;
      }
    }
    .cenima_priceinfo_se {
      height: 30px;
      color: #797d82;
      font-size: 0.173333rem;
      line-height: 19px;
    }
  }
}
</style>
